Skip to content

Conversation

@mrcloverthecoder
Copy link

This patch breaks the limit of IDs for Aet Sets in aet_db by reworking the way those entries are looked up.

By default, what the game does is:

  • Read all aet_db files;
  • Create a vector of Aet Set entries, sorted by ID;
  • Allocate an array of pointers the size of the greatest ID and set the pointer of each entry in that vector in the appropriate slot in this array.

This lookup array makes the game crash when using big IDs for Aet Sets as the game tries to allocate too much memory. Instead, what this patch does is remove this lookup array and search for the entry directly in the sorted vector created previous to it.

Advantages:

  • Now allowed to use Murmurhashes IDs
  • Lower memory usage

Disadvantages:

  • Slower lookup speed (from O(1) to O(log N), as it uses binary search, but realistically the difference should be almost null)

@mrcloverthecoder mrcloverthecoder marked this pull request as draft November 21, 2025 01:44
@mrcloverthecoder
Copy link
Author

Marking this as draft as it's missing sig scans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant